import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';

import { BusinessComponent } from './business.component';
import { BusinessListComponent } from './list/list.component';
import { BusinessAddComponent } from './add/add.component';

@NgModule({
    imports: [RouterModule.forChild([
        { path: '', redirectTo: 'list', pathMatch: 'full'},
        {
            path: '',
            component: BusinessComponent,
            children: [
                {
                    path: 'list',
                    component: BusinessListComponent,
                },
                {
                    path: 'add',
                    component: BusinessAddComponent,
                }
            ]
        }
    ])],
    exports: [RouterModule]
})
export class BusinessRoutingModule { }
